CVE-2025-21654
ovl: support encoding fid from inode with no alias
Description
In the Linux kernel, the following vulnerability has been resolved: ovl: support encoding fid from inode with no alias Dmitry Safonov reported that a WARN_ON() assertion can be trigered by userspace when calling inotify_show_fdinfo() for an overlayfs watched inode, whose dentry aliases were discarded with drop_caches. The WARN_ON() assertion in inotify_show_fdinfo() was removed, because it is possible for encoding file handle to fail for other reason, but the impact of failing to encode an overlayfs file handle goes beyond this assertion. As shown in the LTP test case mentioned in the link below, failure to encode an overlayfs file handle from a non-aliased inode also leads to failure to report an fid with FAN_DELETE_SELF fanotify events. As Dmitry notes in his analyzis of the problem, ovl_encode_fh() fails if it cannot find an alias for the inode, but this failure can be fixed. ovl_encode_fh() seldom uses the alias and in the case of non-decodable file handles, as is often the case with fanotify fid info, ovl_encode_fh() never needs to use the alias to encode a file handle. Defer finding an alias until it is actually needed so ovl_encode_fh() will not fail in the common case of FAN_DELETE_SELF fanotify events.
INFO
Published Date :
Jan. 19, 2025, 11:15 a.m.
Last Modified :
Sept. 26, 2025, 7:48 p.m.
Remotely Exploit :
No
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 3.1 | MEDIUM | [email protected] |
Solution
- Update the Linux kernel to the latest stable version.
- Apply the specific patch for ovl_encode_fh.
- Test the fanotify functionality after updating.
- Verify no new issues arise from the patch.
Public PoC/Exploit Available at Github
CVE-2025-21654 has a 1 public
PoC/Exploit available at Github.
Go to the Public Exploits tab to see the list.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2025-21654.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2025-21654 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2025-21654
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
None
Java Shell
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2025-21654 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2025-21654 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Sep. 26, 2025
Action Type Old Value New Value Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H Added CWE CWE-617 Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.13:rc3:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.13:rc4:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.13:rc5:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.13:rc6:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.6 up to (excluding) 6.6.74 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.7 up to (excluding) 6.12.10 Added Reference Type kernel.org: https://git.kernel.org/stable/c/3c7c90274ae339e1ad443c9be1c67a20b80b9c76 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/c45beebfde34aa71afbc48b2c54cdda623515037 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/f0c0ac84de17c37e6e84da65fb920f91dada55ad Types: Patch -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jan. 24, 2025
Action Type Old Value New Value Removed Reference https://git.kernel.org/stable/c/950b604384fd75d62e860bec7135b2b62eb4d508 Removed Reference https://git.kernel.org/stable/c/a1a541fbfa7e97c1100144db34b57553d7164ce5 -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jan. 23, 2025
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/f0c0ac84de17c37e6e84da65fb920f91dada55ad -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jan. 21, 2025
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/950b604384fd75d62e860bec7135b2b62eb4d508 -
New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jan. 19, 2025
Action Type Old Value New Value Added Description In the Linux kernel, the following vulnerability has been resolved: ovl: support encoding fid from inode with no alias Dmitry Safonov reported that a WARN_ON() assertion can be trigered by userspace when calling inotify_show_fdinfo() for an overlayfs watched inode, whose dentry aliases were discarded with drop_caches. The WARN_ON() assertion in inotify_show_fdinfo() was removed, because it is possible for encoding file handle to fail for other reason, but the impact of failing to encode an overlayfs file handle goes beyond this assertion. As shown in the LTP test case mentioned in the link below, failure to encode an overlayfs file handle from a non-aliased inode also leads to failure to report an fid with FAN_DELETE_SELF fanotify events. As Dmitry notes in his analyzis of the problem, ovl_encode_fh() fails if it cannot find an alias for the inode, but this failure can be fixed. ovl_encode_fh() seldom uses the alias and in the case of non-decodable file handles, as is often the case with fanotify fid info, ovl_encode_fh() never needs to use the alias to encode a file handle. Defer finding an alias until it is actually needed so ovl_encode_fh() will not fail in the common case of FAN_DELETE_SELF fanotify events. Added Reference https://git.kernel.org/stable/c/3c7c90274ae339e1ad443c9be1c67a20b80b9c76 Added Reference https://git.kernel.org/stable/c/a1a541fbfa7e97c1100144db34b57553d7164ce5 Added Reference https://git.kernel.org/stable/c/c45beebfde34aa71afbc48b2c54cdda623515037